home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c++ / 1113 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  2.6 KB

  1. Path: fido.asd.sgi.com!austern
  2. From: fjh@mundook.cs.mu.OZ.AU (Fergus Henderson)
  3. Newsgroups: comp.std.c++
  4. Subject: Re: references and ellipsis
  5. Date: 16 Apr 1996 13:14:16 PDT
  6. Organization: Comp Sci, University of Melbourne
  7. Approved: austern@isolde.mti.sgi.com
  8. Message-ID: <4kvnid$rg5@mulga.cs.mu.OZ.AU>
  9. References: <4kop8j$ino@vishnu.jussieu.fr> <4kpd3v$2fb@engnews1.Eng.Sun.COM> <4kr1p3$67g@mulga.cs.mu.OZ.AU> <KANZE.96Apr15211326@slsvgqt.lts.sel.alcatel.de>
  10. NNTP-Posting-Host: isolde.mti.sgi.com
  11. X-Original-Date: 16 Apr 1996 08:59:57 GMT
  12. X-Auth: PGPMoose V1.1 PGP comp.std.c++
  13.     iQBVAwUBMXP/mUy4NqrwXLNJAQH8JQIAzG3IJLKyr5Lim2N+7IxukVDI7jDHGd5U
  14.     PvSwWeA5bqdfIkX46U5m5L/jZMvbmHcAoIi7pQABvTXPwBI9LKPgaw==
  15.     =qQ8r
  16. Originator: austern@isolde.mti.sgi.com
  17.  
  18. kanze@lts.sel.alcatel.de (James Kanze US/ESC 60/3/141 #40763) writes:
  19.  
  20. >fjh@munta.cs.mu.OZ.AU (Fergus Henderson) writes:
  21. >
  22. >|> clamage@Eng.Sun.COM (Steve Clamage) writes:
  23. >
  24. >|> >According the draft standard, the results of using a reference
  25. >|> >type as the last pararmeter before the ellipsis (...) are
  26. >|> >undefined. See section 18.7 "Other runtime support" [lib.support.runtime].
  27. >
  28. >|> Is there any good reason why this has undefined behaviour rather than
  29. >|> being ill-formed code?  Surely this should be very easy for
  30. >|> implementations to detect and diagnose.
  31. >
  32. >Hysterica^H^H^H^H^H^H^Horical reasons, no doubt.  Declare the last
  33. >parameter a char in C, and you also get undefined behavior.
  34. >
  35. >And it's surely no more difficult to diagnose a double underscore (and
  36. >at least one compiler does), which is also `undefined behavior'.
  37.  
  38. No, I think providing useful diagnostics for use of references before
  39. an elipsis is indeed less difficult than providing useful diagnostics
  40. for use of double underscores.  It's difficult (though by no means
  41. impossible, of course) for implementations to issue diagnostics for
  42. uses of the implementation's part of the namespace without also issuing
  43. diagnostics for definitions in the system header files or in code which
  44. merely references macros defined in the system header files.
  45.  
  46. --
  47. Fergus Henderson <fjh@cs.mu.oz.au>   |  "I have always known that the pursuit
  48. WWW: <http://www.cs.mu.oz.au/~fjh>   |  of excellence is a lethal habit"
  49. PGP: finger fjh@128.250.37.3         |     -- the last words of T. S. Garp.
  50. ---
  51. [ comp.std.c++ is moderated.  To submit articles: Try just posting with your 
  52.                 newsreader.  If that fails, use mailto:std-c++@ncar.ucar.edu
  53.   comp.std.c++ FAQ: http://reality.sgi.com/austern/std-c++/faq.html
  54.   Moderation policy: http://reality.sgi.com/austern/std-c++/policy.html
  55.   Comments? mailto:std-c++-request@ncar.ucar.edu 
  56. ]
  57.